import request from '@/utils/request'

const {
    get: $get,
    post: $post,
    delete: $delete,
    download: $download,
    downloadByGet: $downloadByGet,
} = request

// 查询公共诉求信息全部
export const publicAppealList = data => {
    return $get('/risk/publicAppeal/list', data)
}

// 查询公共诉求信息列表
export const publicAppealPage = data => {
    return $get('/risk/publicAppeal/page', data)
}

// 新增公共诉求信息
export const publicAppealAdd = data => {
    return $post('/risk/publicAppeal/add', data)
}

// 查询公共诉求信息详情
export const publicAppealDetail = id => {
    return $get('/risk/publicAppeal/detail/'+ id)
}

// 更新公共诉求信息
export const publicAppealUpdate = data => {
    return $post('/risk/publicAppeal/update', data)
}

// 删除公共诉求信息
export const publicAppealDelete = id => {
    return $post('/risk/publicAppeal/delete/'+ id)
}

// 导出公共诉求信息
export const publicAppealExport = (data,fileName) => {
    return $download('/risk/publicAppeal/export',data, fileName)
}

// 公众诉求量统计
export const appealCountStatistics = data => {
    return $get('/risk/publicAppealFollow/appealCountStatistics', data)
}
// 诉求处置时间统计
export const appealDealTimeStatistics = data => {
    return $get('/risk/publicAppealFollow/appealDealTimeStatistics', data)
}
// 公众满意度统计
export const appealStarStatistics = data => {
    return $get('/risk/publicAppealFollow/appealStarStatistics', data)
}
// 公众诉求导出
export const appealCountStatisticsExport = (data,fileName) => {
    return $download('/risk/publicAppealFollow/appealCountStatisticsExport',data, fileName)
}
// 诉求处置时间统计导出  
export const appealDealTimeStatisticsExport = (data,fileName) => {
    return $download('/risk/publicAppealFollow/appealDealTimeStatisticsExport',data, fileName)
}
// 公众满意度统计导出
export const appealStarStatisticsExport = (data,fileName) => {
    return $download('/risk/publicAppealFollow/appealStarStatisticsExport',data, fileName)
}